﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;

public partial class Admin_Category : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        lblMessage.Text = "";
    }
    protected void ListView1_ItemInserting(object sender, ListViewInsertEventArgs e)
    {
        bool b = true;
        foreach (DictionaryEntry item in e.Values)
        {
            if (item.Value == null)
            {
                e.Cancel = true;
                b = false;
            }
        }
        if (!b)
        {
            lblMessage.Text = "Not Empty";
        }
        else {
            lblMessage.Text = "";
        }
    }
    protected void ListView1_ItemUpdating(object sender, ListViewUpdateEventArgs e)
    {
        bool b =true;
        foreach (DictionaryEntry item in e.NewValues)
        {
            if (item.Value == null)
            {
                e.Cancel = true;
                b = false;
            }
        }
        if (!b)
        {
            lblMessage.Text = "Not Empty";
        }
        else
        {
            lblMessage.Text = "";
        }
    }
}